package com.qiwenshare.fund.controller;

import com.qiwenshare.fund.strategy.FundMacdStrategy;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName Strategy
 * @Description TODO
 * @Author peng.zhang
 * @Date 9:10 2023/6/8
 * @Version 1.0
 **/
@RequestMapping("strategy/fund")
@RestController
public class FundStrategyController {
    @Resource
    private FundMacdStrategy fundMacdStrategy;


    @GetMapping("macd/backTest")
    public Object macd(String start,String end) {
        fundMacdStrategy.backTest(start,end);
        return "ok";
    }

    @GetMapping("macd/backFundTest")
    public Object backFundTest(String stockNum,String start,String end) {
        fundMacdStrategy.backFundTest(stockNum,start,end);
        return "ok";
    }
}
